package cn.demo.app.api;

import cn.demo.app.consts.CloudServerNamed;
import cn.demo.app.fallback.EchoFallBack;
import cn.demo.app.fallback.ShowFailBack;
import cn.ifloat.brick.sprofile.common.ConditionServerMode;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author: float 2023/7/4 09:43
 */
@Lazy
@ConditionServerMode
@FeignClient(name = CloudServerNamed.EXAMPLE_SERVER_NAME, contextId = "showApi", fallback = ShowFailBack.class)
public interface ShowApi {
     @GetMapping("/show/print")
     Map<String,String> print(@RequestParam("msg") String msg);

    @GetMapping("/show/str")
    String str(@RequestParam("msg") String msg);
}

